﻿@using CuongHanh
@using CuongHanh.Context
@using CuongHanh.Models
@using CuongHanh.Models.View
@{
    string language = Session[AppUtil.LANGUAGE] + "";
}

<h2>
    @Html.GetResource("danhmucsanpham")
</h2>
<ul class="top-1">

    @foreach (CategoryView item in Cached.Sigleton.GetMenuByBranchId(AppUtil.STONE_CODE))
    {
        string categoryName = AppUtil.CategoryViewName(item,
                language);

        <li  class="item-top-1">
            <a href="@UrlManager.LinkStoneCategory(item.Id,
                             categoryName.ToUrlName())">@categoryName</a>
            <ul class="top-2">
        @foreach (SubCategoryView subItem in item.SubCategoriesView)
        {
            string subCategoryName = AppUtil.SubCategoryViewName(subItem,
                    language);
            <li class="item-top-2"><a href="@UrlManager.LinkStoneSubCategory(subItem.Id,
                                 subCategoryName.ToUrlName(),
                                 categoryName.ToUrlName())">@subCategoryName</a>
            </li>
                }
                 </ul>
        </li>
    }
</ul>